package com.gpy.hospital.reception.controller;

import com.gpy.hospital.cms.pojo.Doctor;
import com.gpy.hospital.reception.service.IZhuanJiaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * @Author
 * @Date 2020/3/26 12:19
 * @Desc
 **/
@Controller
public class ZhuanJiaController {
    @Autowired
    private IZhuanJiaService zhuanJiaService;

    @GetMapping("/zhuan/jia/all")
    public String zhuanJiaAllPage(Model model) {
        List<Doctor> doctors =  zhuanJiaService.getAllByStatus();
        model.addAttribute("doctors", doctors);
        return "/reception/zhuanijaList";
    }
}
